﻿using System;
using System.Collections.Generic;

namespace Genrsis.WorkitemTracking.Domain
{
    public class Workflow : IIdentifiable
    {
        public string Id { get; set; }
        public string Name { get; private set; }
        public string CreatedByUserId { get; private set; }
        public ICollection<WorkflowStateTransition> Transitions { get; set; }

        public Workflow()
        {
        }

        public Workflow(string name, string createdByUserId)
        {
            Name = name;
            CreatedByUserId = createdByUserId;
        }

        public void Rename(string newName)
        {
            Name = newName;
        }
    }
}